from django.db import models

# Create your models here.


class LogsList(models.Model):
    """
    日志记录
    """
    class Meta:
        db_table = 'logrecord'
    name = models.CharField(verbose_name="名字", max_length=32)
    grade = models.IntegerField(verbose_name="等级", null=True, blank=True)  # 0 信息   1 警告  2 错误
    describe = models.CharField(verbose_name="描述", max_length=128, null=True, blank=True)
    user = models.ForeignKey("userManage.Loginuser", on_delete=models.CASCADE, null=True, blank=True)
    timer = models.DateTimeField(verbose_name="时间", auto_now_add=True, blank=True)
    ip = models.CharField(verbose_name="ip", max_length=32, null=True, blank=True)